//导入excel文件
$("#saveZipButton").on('click', function(){
    var formData = new FormData();
    var name = $("#articleImageFile").val();
    formData.append("file",$("#articleImageFile")[0].files[0]);
    formData.append("name",name);//这个地方可以传递多个参数
    $.ajax({
        url :  ctx+"submission/batchImport",
        type : 'POST',
        async : false,
        data : formData,
        // 告诉jQuery不要去处理发送的数据
        processData : false,
        // 告诉jQuery不要去设置Content-Type请求头
        contentType : false,
        beforeSend:function(){
            console.log("正在进行，请稍候");
        },
        success : function(responseStr) {
            if(responseStr=="01"){
                alert("导入成功");
            }else{
                alert("导入失败");
            }
        }
    });
});

//下载excel文件

$("#exportExcel").click(function () {
    var obj = new Object();
    var id = $("#id").val();
    var paymentChannels =$('#selectPaymentChannels option:selected').val().trim();
    var complaintChannels =$('#selectComplaintChannels option:selected').val().trim();
    var startTime = $("#startTime").val();
    var endTime = $("#endTime").val();
    var contactInformation = $("#contactInformation").val();
    var busCompany = $("#busCompany").val();
    var complaintType = $("#selectComplaintType option:selected").val().trim();
    var dutyDetermine = $("#selectDutyDetermine option:selected").val().trim();
    var processing = $("#selectProcessing option:selected").val().trim();
    var handler = $("#handler").val();

    window.location.href=ctx+"submission/exportExcel?startTime="+startTime+"&endTime="+endTime+"&id="+id+"&paymentChannels="+paymentChannels+"&complaintChannels="+complaintChannels+"&contactInformation="+contactInformation+"&busCompany="+busCompany+"&complaintType="+complaintType+"&dutyDetermine="+dutyDetermine+"&processing="+processing+"&handler="+handler;
})